
import 'dart:convert';

ClassSkillsResult classSkillsResultFromJson(String str) =>
    ClassSkillsResult.fromJson(json.decode(str));

String classSkillsResultToJson(ClassSkillsResult data) =>
    json.encode(data.toJson());

class ClassSkillsResult {
  ClassSkillsResult({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  Result? result;

  factory ClassSkillsResult.fromJson(Map<String, dynamic> json) =>
      ClassSkillsResult(
        status: json["status"],
        message: json["message"],
        result: json["result"] != null ? Result.fromJson(json["result"]) : null,
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result?.toJson(),
      };
}

class Result {
  Result({
    this.dataList,
  });

  List<DataList>? dataList;

  factory Result.fromJson(Map<String, dynamic> json) => Result(
        dataList: json["dataList"] != null
            ? List<DataList>.from(
                json["dataList"].map((x) => DataList.fromJson(x)))
            : null,
      );

  Map<String, dynamic> toJson() => {
        "dataList": dataList != null
            ? List<dynamic>.from(dataList!.map((x) => x.toJson()))
            : null,
      };
}

class DataList {
  DataList({
    this.id,
    this.name,
    this.parentid,
    this.value,
    this.total,
    this.correct,
  });

  int? id;
  String? name;
  int? parentid;
  int? value;
  int? total;
  int? correct;

  factory DataList.fromJson(Map<String, dynamic> json) => DataList(
        id: json["id"],
        name: json["name"],
        parentid: json["parentid"],
        value: json["value"],
        total: json["total"],
        correct: json["correct"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "name": name,
        "parentid": parentid,
        "value": value,
        "total": total,
        "correct": correct,
      };
}
